package com.albaba.designpattern.bridge.text_002;

/**
 * @Description: 支付渠道之一
 * @Author zx
 * @Date 2025/2/20 17:52
 * @Version 1.0
 */
public class WxPay extends Pay {

    public WxPay(IPayMode payMode) {
        super(payMode);
    }

    @Override
    public String transfer(String uId, String tradeId) {

        System.out.println("微信支付，tradeId：" + tradeId);

        boolean security = payMode.security(uId, tradeId);

        System.out.println("微信支付，校验安全：" + security);

        if (security) {
            System.out.println("微信支付，支付成功");
        } else {
            System.out.println("微信支付，支付失败");
        }
        return "200";
    }
}
